/*
 * Created by Sun Wen on 2018/11/15.
 */
function initescroll(){
    var documentHeight = 1448    //part1
    // var documentHeight = 8680     //part2
    // var documentHeight = 9470        //part3
	canvas_scale = 750 / 750;
	rem = 750 / 750 * 100;
	canvasWidth = 750;
	canvasHeight = documentHeight;
	endline = documentHeight - (750 / document.documentElement.clientWidth) * document.documentElement.clientHeight;
	// console.log(endline);
	canvas = document.getElementById("canvas");
	canvas.width = canvasWidth
	//根据宽度计算出的高度。在满屏，没有滑动的情况下使用
	canvas.height = document.documentElement.clientHeight * (750 / document.documentElement.clientWidth);
	// canvas.height = document.documentElement.clientHeight;
	stage = new createjs.Stage('canvas');
    stage.regX = 0;
    stage.regY = 0
	container = new createjs.Container();
	stage.addChild(container);
	stage.enableMouseOver()

	var scrollContainer = $('#content')
	var scroller = $('#canvas')
	document.body.addEventListener('touchmove', function (e){
		e.preventDefault();
	}, {passive: false}); //阻止默认的处理方式(阻止下拉滑动的效果) passive 参数不能省略，用来兼容ios和android

}
